#pragma once
#include <ddraw.h>
#include <GdiPlus.h>


#pragma comment(lib, "gdiplus.lib")


using Gdiplus::Graphics;
using Gdiplus::GraphicsPath;
using Gdiplus::GraphicsContainer;
using Gdiplus::Region;
using Gdiplus::SolidBrush;
using Gdiplus::LinearGradientBrush;
using Gdiplus::TextureBrush;
using Gdiplus::PathGradientBrush;
using Gdiplus::Color;
using Gdiplus::ColorMatrix;
using Gdiplus::ARGB;
using Gdiplus::Pen;
using Gdiplus::Image;
using Gdiplus::ImageAttributes;
using Gdiplus::Bitmap;
using Gdiplus::CachedBitmap;
using Gdiplus::PixelFormat;
using Gdiplus::Ok;
using Gdiplus::Rect;
using Gdiplus::Point;
using Gdiplus::Size;
using Gdiplus::RectF;
using Gdiplus::PointF;
using Gdiplus::SizeF;


namespace GdipKit
{
	void* InitGdiplus(void);
	Bitmap* LoadImage(LPCTSTR szFileName, INT nWidth, INT nHeight, INT nMode);
	Bitmap* CopyImage(Image* pSrcImage, INT nWidth, INT nHeight, INT nMode);
}


class GraphicsRoundRectPath : public GraphicsPath
{
public:
	GraphicsRoundRectPath(void);
	GraphicsRoundRectPath(const Rect& rect, INT cornerX, INT cornerY);
	GraphicsRoundRectPath(INT x, INT y, INT width, INT height, INT cornerX, INT cornerY);
	virtual ~GraphicsRoundRectPath(void);

public:
	void AddRoundRect(const Rect& rect, INT cornerX, INT cornerY)
	{
		AddRoundRect(rect.X, rect.Y, rect.Width, rect.Height, cornerX, cornerY);
	}
	void AddRoundRect(INT x, INT y, INT width, INT height, INT cornerX, INT cornerY);
};

